package com.jews.securityleam.controller;

import lombok.Data;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "auth")
public class AuthController {

    @PostMapping("passLogin")
    public String passLogin(@RequestBody PasswordLoginRequest request) {
        return "Token";
    }

    @PostMapping("smsLogin")
    public String smsLogin(@RequestBody SmsLoginRequest request) {
        return "Token";
    }

    @Data
    public static class SmsLoginRequest {
        private String phone;
        private String verifyCode;
    }

    @Data
    public static class PasswordLoginRequest {
        private String username;
        private String password;
    }
}
